Part Number Hot Search : 
1R6U6T SMA4750A ON1865 NSF8KT PE4549 2412WI KRX103 EGL341A
Product Description
Full Text Search
 

To Download ELM408 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ELM408 elm electronics ?circuits for the hobbyist www.elmelectronics.com connection diagram pdip and soic (top view) v dd v ss 1 2 3 4 8 7 6 5 rotary decoder - 2 wire interface the ELM408 is an 8 pin integrated circuit that is used to convert the output from a rotary encoder into two signals (chip select, and up/down) that can be used to control various devices. the low power cmos technology used ensures that only a very small current is required over the entire 2.0 to 5.5 volt operating range. there is no need for external filtering or debounce circuits with the ELM408, as this is all performed within the integrated circuit. after debouncing the encoder signals, the ELM408 determines the direction of shaft rotation, and then generates the appropriate outputs. a write sequence can also be generated if the write enable input is at a high level when the outputs are generated. the ELM408 provides both 2x and 4x decoding of a rotary encoder signal. see the output waveforms section for more information. a b description digital audio potentiometer controls variable voltage or temperature circuits positioning controls tuning circuits applications block diagram 1 of 10 low power cmos design wide supply range ?2.0 to 5.5 volts complete debouncing of the encoder inputs no external filtering needed 2x and 4x decoding can generate a write sequence startup delay timer high current drive outputs features ELM408dsa write enable cs u/d b 7 a debounce circuit 2 cs 5 v dd direction decoding 4 write enable v dd output logic 3 u/d rotary encoder debounce circuit 6 4x/2x 4x/2x
ELM408 elm electronics ?circuits for the hobbyist www.elmelectronics.com pin descriptions 2 of 10 all rights reserved. copyright 2011 elm electronics. every effort is made to verify the accuracy of information provided in this document, but no representation or warranty can be given and no liability assumed by elm electronics with respect to the accuracy and/or use of any products or information described in this document. elm electronics will not be responsible for any patent infringements arising from the use of these products or information, and does not authorize or warrant the use of any elm electronics product in life support devices and/or systems. elm electronics reserves the right to make changes to the device(s) described in this document in order to improve reliability, function, or design. v dd (pin 1) this pin is the positive supply pin, and should always be the most positive point in the circuit. internal circuitry connected to this pin is used to provide power on reset of the internal logic, so an external reset signal is not required. refer to the electrical characteristics section for more information. a (pin 2) this input should be connected to what is normally known as the ??signal from a rotary (quadrature) encoder. the signal at this pin should lead (ie change state before) the signal at pin 3 when the device is being moved in a clockwise or up direction. an external pullup resistor is required for the encoder (a typical value is 10 k w ), but no external capacitors are needed (as the internal debounce circuitry provides the filtering). b (pin 3) this input should be connected to what is normally known as the ??signal from a rotary (quadrature) encoder. the signal at this pin should lag behind (ie change state after) the signal at pin 2 when the device is being moved in a clockwise or up direction. an external pullup resistor is required for the encoder (a typical value is 10 k w ), but no external capacitors are needed (as the internal debounce circuitry provides the filtering). write enable (pin 4) this input controls the state of the u/d output when the rising edge of the cs output occurs. if pin 4 is high, the u/d output will be set high during the cs transition, which generates an eeprom write for many digital potentiometer chips. 4x/2x (pin 5) this input controls how many sets of output pulses are generated for each complete cycle of the a and b inputs. if it is high, the cs and u/d outputs will sequence 4 times for each (one for each of the four transitions). if the input is low, only two sets of pulses are generated. note that the ELM408 is not capable of generating 1x decoding (one set of output pulses). if your application needs this, you may be able to use the elm401 and generate them in software. u/d (pin 6) the ?p/down?output serves multiple purposes when used with a typical digital potentiometer. the level that it is at when the cs output transitions low typically sets the ?ode?(count up or count down), while rising edges of the signal are usually used to generate ?ount?(ie clock) pulses. finally, the level that u/d is at when the cs output returns high will often determine whether the potentiometer setting is written to non-volatile memory or not. cs (pin 7) this output provides a ?hip select? or enable function. it works with the u/d output to provide various control functions. see the output waveforms section (on page 7) for more information. v ss (pin 8) circuit common is connected to this pin. this is the most negative point in the circuit. ELM408dsa
ordering information elm electronics ?circuits for the hobbyist www.elmelectronics.com these integrated circuits are only available in either a 300 mil plastic dip format, or in a 150 mil soic surface mount type of package. to order, add the appropriate suffix to the part number: 300 mil plastic dip............................... ELM408p 150 mil soic..................................... ELM408sm ELM408 3 of 10 ELM408dsa outline diagrams the diagrams at the right show the two package styles that the ELM408 is available in. the first shows our ELM408p product, which is an ELM408 in a 300 mil dip package. this is a standard through hole type dual inline package. the ELM408sm is our surface mount version of the ELM408. the device package has a 3.90 mm wide body, and is commonly called a 150 mil soic package. the drawings shown here provide the basic dimensions for these ics only. please refer to the following microchip technology inc. documentation for more detailed information: microchip packaging specification , document name en012702.pdf (7.5mb). at the www.microchip.com home page, click on packaging specifications, or go to www.microchip.com/packaging ? pic12f508/509/16f505 data sheet , document 41236e.pdf (1.5 mb). at the www.microchip.com home page, click on data sheets, then search for 12f508. note: all dimensions shown are in mm. ELM408p max 10.92 6.35 ELM408sm 3.90 6.00 1.27 2.54
4 of 10 ELM408 electrical characteristics absolute maximum ratings storage temperature....................... -65? to +150? ambient temperature with voltage applied.................................. -40? to +85? voltage on v dd with respect to v ss ............ 0 to +6.5v voltage on any other pin with respect to v ss ........................... -0.3v to (v dd + 0.3v) note: stresses beyond those listed here will likely damage this device. these values are given as a design guideline only. the ability to operate to these levels is neither inferred nor recommended. all values are for operation at 25? and a 5v supply, unless otherwise noted. for further information, refer to note 1 below. characteristic minimum typical maximum conditions units supply voltage, v dd 2.0 5.0 5.5 v v dd rate of rise 0.05 v/msec average supply current, i dd 0.6 1.1 ma v dd = 5.0v notes: 1. this integrated circuit is based on a microchip technology inc. pic12f5xx device. for more detailed specifications, please refer to the microchip documentation (www.microchip.com). 2. this spec must be met in order to ensure that a correct power on reset occurs. it is quite easily achieved using most common types of supplies, but may be violated if one uses a slowly varying supply voltage, as may be obtained through direct connection to solar cells, or some charge pump circuits. 3. the internal reset circuitry stops the ELM408 from doing anything during this period, so that the power supplies and oscillators have time to stabilize. during this time, all pins behave like inputs. 4. typical only - the actual period varies with the amount of noise present in the input signal. 5. all filtering, delay, and output timing is based on an internal master oscillator. the frequency of this oscillator will vary with voltage and temperature. values shown are typical maximums for 2.0v v dd 5.5v, and temperatures of -40? to +85? output low current (sink) 10 ma ma 5.0 v ol = 0.25v see note 2 ELM408dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com debounce period msec 5.5 v dd = 2.0v 0.2 0.3 ma v dd = 5.0v v dd = 3.0v v ol = 0.25v output high current (source) 2.5 ma ma 1.7 v oh = 4.75v v dd = 5.0v v dd = 3.0v v oh = 2.75v see note 4 power on reset time 9 msec see note 3 18 30 msec 50 internal timing variation % 1 4 see note 5 startup time delay
5 of 10 ELM408 ELM408dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com rotary encoders a rotary encoder (sometimes referred to as a quadrature encoder) is a device that produces digital (on/off) outputs in response to rotary, or circular, motion. it is often constructed such that it looks very much like a potentiometer, or audio volume control (see the picture of a typical device, at the right). as the encoder shaft is turned, internal contacts open and close, creating two waveforms that are ideally separated in phase by 90 degrees (ie ?n quadrature?. actually, you need to provide external ?ullup?resistors and a power supply to create these waveforms, as the contacts themselves can not do this. an ideal waveform from a rotary encoder would look like this: due to the 90 degree phase difference, when one waveform changes, the other is always stable. by noting the direction of the change and the level of the other input at that time, you can determine the direction of motion of the shaft. rotary encoders are not ideal, however. due to their construction, and variations in shaft speed, the waveforms are not perfectly square with the 50% duty cycles shown. figure 2 shows a captured trace from a real rotary encoder that is more representative of what you will typically find. note that the two ?cope channels (1 and 2) represent the encoder outputs a and b, respectively. the ch 1 (a) waveform leads the ch 2 (b) waveform, which usually means that the shaft is turning in a clockwise direction. the first rising edge of the channel 2 waveform shows another problem that occurs with moving mechanical contacts - multiple pulses due to bounce. when two contacts meet, the moving one will tend to bounce, like a ball does when it is dropped on the floor. each bounce results in an electrical connection being made, then broken, which will look like multiple inputs to a fast electronic circuit. various mechanical means are used to reduce the amount of bounce, but it can never really be eliminated. the following section discusses how the ELM408 uses electronic means to remove the bounce. figure 2. actual rotary encoder waveform figure 1. quadrature waveforms a b a typical rotary encoder
elm electronics ?circuits for the hobbyist www.elmelectronics.com 6 of 10 ELM408dsa ELM408 debouncing circuits any time that two metal surfaces meet, as they do inside a rotary encoder, there will be a tendency for the moving one to bounce, which causes the electrical connection to make and break. the duration of this bouncing action may be very short, but it is usually fast enough to cause multiple counts to be recorded by connected electronic circuits. as the number of bounces can not be predicted, a means of removing them is necessary. circuits that remove the bounce are usually called ?ebouncing?circuits. many debouncing circuits employ a simple timer to determine if an input is stable. this generally works well if the two contacts meet and then remain still. with a rotary encoder however, one of the contacts meets the other then usually continues sliding over the surface of the stationary contact. this will produce noise while the contact is sliding, occasionally enough to make it look like there are more inputs. the ELM408 employs a two stage system to remove the bounce and the sliding noise from the input signal. a block diagram of the stages are shown in figure 3. the first stage is a digital filter circuit that is used to determine the average value of the waveform over a time. if a long enough time is chosen, short duration pulses will have little effect on the overall average. if the time chosen is too long, however, the circuit will be slow to respond, and may in fact average out some legitimate inputs. choosing the time period (or time constant of the circuit) is thus very important in determining how effective the filtering function will be. we have found that with typical rotary encoder specifications (usually 3.0 msec of bounce or noise, maximum), the ELM408 debounce circuit works quite well. after the signal has been filtered, it is compared to some reference levels, and the output of these comparators are used to control a simple timer. the timer is used to ensure that the output of the filter is stable, and not just a momentary transient, while the use of two comparator levels provides hysteresis, so that some variation in the filter output can be tolerated. once the signals from the rotary encoder have been debounced, they may be used by the direction logic circuitry. the following section shows what the ELM408 is able to produce from these signals. figure 3. internal debouncing logic tc = 1.7 msec 3 msec timer timer filter rotary encoder input to output logic
7 of 10 ELM408dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com ELM408 output waveforms once the ELM408 has some bounce-free signals to work with, it can generate outputs based on them. the output sequences that the ELM408 generates depends on the direction of shaft rotation, and on the level at the write enable input (pin 4). the direction logic always assumes that the encoder is a standard one, where the ??signal leads the ??for a clockwise or ?p?rotation. note that the level at pin 5 only determines when the sequences are output, and does not affect the waveshape or timing of them. figures 4 to 7 below show the sequences that the ELM408 can generate. in all cases, the basic time interval is 200 ?ec (if it does not seem apparent). figures 4 and 5 show the two types of sequences that would occur if the write enable is low (ie disabled). the level at the u/d output when the cs signal goes low determines whether the the controlled device will count up (level is high), or down (level is low) when the u/d pin next goes from low to high. for many digital potentiometers, the level at the u/d pin when the cs output returns high determines whether the current setting of the digital potentiometer is to be stored in non-volatile memory or not. if the ELM408? write enable input is high, then the u/d output will be held high during the transition, causing a write for many digital potentiometers. the resulting waveforms are shown in figures 6 and 7. the logic to decode the motion of an encoder shaft, and so decide when to provide output sequences is not as simple as it would first appear. some authorities recommend simply monitoring an input and when it changes, provide an output based on the level of the other input. this does not always work, as the encoder can output multiple signals from only the ??or or only the ??contact if the shaft is moved ever so slightly when at the detent or at the mid-point position (between detents). simply seeing one input change is not sufficient to say that there is any significant shaft rotation. the ELM408 monitors both ??and ??transitions, and determines the outputs based on the sequence in which the transitions have occurred. this is a better way to guarantee that the output signals are generated properly. the internal logic also performs some self- checking, and monitors for problems such as an output pulse being initiated before the previous one had completed, which might occur for some very fast inputs (the second one will be ignored in this case). the output of the ELM408 is a series of pulses, as shown in figures 8 and 9. the first figure shows 2x figure 4. up (clockwise) with write enable = low cs u/d 200 ?ec figure 5. down (counterclockwise) with write enable = low cs u/d 200 ?ec figure 6. up (clockwise) with write enable = high cs u/d 200 ?ec cs u/d 400 ?ec figure 7. down (counterclockwise) with write enable = high
8 of 10 ELM408dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com ELM408 output waveforms (continued) figure 9. 4x output signals (pin 5 = high) decoding (there are two sets of output pulses for each set of waveforms from the a and b inputs), while the second (figure 9) shows 4x decoding. in both cases, the write enable input is high, but this has no bearing on whether the sets of pulses are generated or not. figure 8 also shows what happens when the rotary encoder shaft is ?iggled? generating pulses on only the a or only the b input - the logic detects this and ignores them. in order for an output to be generated, the ELM408 must see a change on one of the rotary encoder inputs followed by a change on the other input. the 4x decoding is a little different in this respect. it will generate one pulse in anticipation of a change of direction when the same input (a or b) changes two times in a row. figure 10 on the next page shows how this typically works. if the logic to detect and ignore multiple inputs such as this were not in place, then multiple outputs could occur due to vibration (as found in an automobile, or an industrial setting), and the setting could ?reep?with time ?even though the shaft was not actually turned. generally, output pulses will occur in groups of four (between each detent), so resistance values or settings will repeat consistently as the shaft is rotated in one direction and then in the other. depending on when the shaft changes direction, however, the pulses may not be generated in groups of four. if your application demands that the controlled variable must repeat exactly as the shaft is turned in either direction, you may prefer to use a 2x decoder setting. a input b input direction changes cs u/d a ?iggle?or vibration causes b to change, but a does not, so the pulse is ignored u/d a input b input debounce delay cs direction changes figure 8. 2x output signals (pin 5 = low)
design considerations 9 of 10 ELM408dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com ELM408 there are a few details to consider when using the ELM408 to interface to a rotary encoder. the first is the fact that the signals available from the encoder are usually only dry contacts closing and opening. you will need to provide pullup resistors for these signals in order to use them in a circuit. the size of the pullup resistor is chosen based on the encoder specifications. the main concern is the maximum current carrying capacity, which sets a lower limit for the pullup resistance. an upper limit for the resistance is set by the minimum current required for contact wetting. if you do not provide enough current through mechanical contacts when they are closed, they will tend to go open with time. a maximum current specification is usually in the range of 1 to 10 ma, while the minimum wetting current would be in the range of 1 ma. this means that with a 5v supply, a pullup resistor of 5 to 10 k w is typically required. the second concern is the use of capacitors on the ??and ??signal lines. many encoder circuits show these as a way to provide some pre-filtering of the signal. that is fine, as long as you realize that the ELM408 inputs are cmos and do not have schmitt trigger waveshaping. this means that you should keep the rate of change of the input signal as high as possible to avoid problems (we usually try to maintain at least 1v/?ec). typically, with a 5v supply, a 10 k w pullup, and ttl thresholds, this means capacitor values of no more than about 330 pf, while with a 2.0v supply, the limit would be about 100 pf. one other issue to consider is that during the initial circuit startup, there is a period (of about 20 msec) when the ELM408 is being held in a reset state, and the outputs are in a tristate condition. during this time, the outputs will sit at the level they were at before power up (0v) due to stray capacitance having discharged through the protection diodes. since the cs is active low, this may cause a problem if your controlled circuit is ready too fast. if you require that pins 7 (and possibly pin 6) go to a high level as quickly as possible, you may want to install pullup resistors (of about 10 k w ) on these pins to ensure that the voltage rises quickly to v dd . after the initial 20 msec period, the ELM408 sets all pins to their quiescent levels, but does not change any outputs for an additional 50 msec. this ensures that the external circuits have had adequate time to initialize, before being presented with signals to process. figure 10. 4x decoding with the input chattering output waveforms (continued) change in b (expecting a change in a) causes the ELM408 to anticipate a change in direction, and generate a down output a input b input multiple pulses are ignored while the ELM408 waits for a change at the a input the shaft direction changes again a changes, meaning that the shaft is now rotating, and pulses can be output cs u/d
figure 11 below shows one example of how the ELM408 might be used with a digital potentiometer (in this case, a microchip technology mcp4011). pullup resistors of 10 k w are used with the rotary encoder to provide voltages for the a and b inputs of the ELM408. power is supplied from a common source that we?e simply labelled v dd (it should be between 2.7v and 5.5v for the mcp4011), and a small capacitor has been added to ensure that the supply is filtered. the mcp4011 data sheet recommends using a 0.1 ? capacitor, so if this is physically very close to the ELM408, you might be able to eliminate the 0.01 ? one pins 4 and 5 of the ELM408 have been connected to circuit common (v ss ) which means that the outputs will appear as in figures 4 and 5, and that we are using 2x decoding. the ELM408 output lines are example application figure 11. connecting the ELM408 to a mcp4011 10 of 10 ELM408dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com ELM408 directly connected to the mcp4011 inputs, and we have added a 10 k w pullup resistor on the cs line to ensure that the voltage rises as quickly as possible after power on. that? about all there is to using the ELM408. connect pullup resistors to your rotary encoder, connect the encoder signals to the ELM408, then connect the ELM408 to the controlled circuit. use a common supply for all the devices, and add a small bypass capacitor across the supply line. the controlled devices can be digital pots, microprocessors, or almost any circuit that will accept cmos signals. enjoy! 0.01? 1 2 3 4 8 7 6 5 v dd v dd 10 k w 10 k w a b rotary encoder c mcp 4011 1 2 3 4 8 7 6 5 h w l v dd 10 k w 0.1? v dd


▲Up To Search▲   

 
Price & Availability of ELM408

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X